{$mode delphi} 

{
 
 $Id: build.pas 4 2006-10-05 09:18:53Z kcynarski $
 $HeadURL: http://isbuilder.googlecode.com/svn/trunk/build.pas $
 Inno Setup Builder
 Build Tool
 
}

uses sysutils, classes, cmdline, commonfunc, commonstrings, datafile;

procedure PrintHeader;
begin
  writeln;
  writeln('  ISB Build Tool');
  writeln('  '+isb_version_string);
  writeln('  --');
  writeln;
end;

procedure Trashy;
var f:TDataFile;
    m:TStringList;
begin
   try
    f:=TDataFile.Create('datafiles\example.isb');
    f.ProcessContent;
    m:=TStringList.Create;
    m.Add('APPLICATION');
    //m.Clear;    
    f.LoadVariables('##.var');
    f.ProcessDefines('beta','full',nil);
    f.ProcessDefinesFile('##.inc');
    f.SaveVariables('##.var');
   except
    on E:Exception do FatalError('Unhandled Exception: ',[],e);
   end;
   f.Free;
   m.Free;
end;


begin
  SetDebugVerboseLevel(vlDebug);
  PrintHeader;
  Trashy;
end.